//
//  OADAlertContentViewController.m
//  OASDK_Works
//
//  Created by ChenJie on 5/10/20.
//  Copyright © 2020 Mist. All rights reserved.
//

#import "OADAlertContentViewController.h"
#import "OASDK.h"

@interface OADAlertContentViewController ()

@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation OADAlertContentViewController

#pragma mark - ViewController lifecycle

- (instancetype)init {
    self = [super init];
    if (self) {
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //
    self.view.backgroundColor = OARandomColor();
    self.navigationItem.title = NSStringFromClass(self.class);
    
    //
    [self.view addSubview:self.contentLabel];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
}

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
}

- (void)viewDidLayoutSubviews {
    [super viewDidLayoutSubviews];
    
    //
    self.contentLabel.frame = self.view.bounds;
    self.contentLabel.backgroundColor = OARandomColor();
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

#pragma mark - Public methods



#pragma mark - Private methods



#pragma mark - Event response methods

- (void)buttonClicked:(UIButton *)button {
    NSLog(@"button clicked...");
}

#pragma mark - Deletate methods



#pragma mark - Setter

- (void)setContent:(NSString *)content {
    _content = content;
    
    self.contentLabel.text = content;
}

#pragma mark - Getter

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
        label.font = [UIFont systemFontOfSize:13];
        label.numberOfLines = 0;
        label.textAlignment = NSTextAlignmentLeft;
        
        _contentLabel = label;
    }
    return _contentLabel;
}

#pragma mark - Memory management

- (void)dealloc {
}

@end
